<template>
  <div class="home-new">
    <Panel title="推荐商品" sub-title="新鲜出炉 品质靠谱">
      <!-- 面板内容 -->
      <ul class="goods-list">
        <li v-for="item in goods" :key="item.id">
          <!-- <RouterLink :to="`/product/${item.id}`"> -->
            <img :src="item.src" alt="">
            <p class="name ellipsis">{{item.name}}</p>
            <p class="price">&yen;{{item.price}}</p>
          <!-- </RouterLink> -->
        </li>
      </ul>
    </Panel>
  </div>
</template>
<script>
import Panel from '../Panel'
export default {
  name: 'RecommendInfo',
 components:{Panel},
  data(){
    return {
     
      pictures:[ {
          src: require('../../../assets/images/9172100872625837.jpg'),
          price:"123"
        },
        {
          src: require('../../../assets/images/9619200610858971.jpg'),
         price:"123"
        },
        {
          src: require('../../../assets/images/9868691810845929.jpg'),
          price:"123"
        },
        {
          src: require('../../../assets/images/9619200610858971.jpg'),
          price:"123"
        }],
  }
  },
   created(){
   this.goods = this.pictures; 
      /* findNew().then(data => {
      this.goods = data.result
    })*/
  }
}
 
</script>
<style scoped lang="less">
*{
    text-decoration: none;
}
.home-new{
  width: 1350px;
  margin:0 auto;
}
.goods-list {
  display: flex;
  justify-content: space-between;
  height: 406px;
  // width: 1350px;
  margin: 0 auto;
  li:hover{
    box-shadow: 0 3px 10px 4px rgba(0, 0, 0, 0.377);
    top: -10px;

  }
  li {
    width: 306px;
    height: 406px;
    top: 0px;
    background: #f0f9f4;
    list-style: none;
    position: relative;
    transition: .8s ease;
    /*.hoverShadow();*/
    img {
      width: 306px;
      height: 306px;
    }
    p {
      font-size: 22px;
      padding: 12px 30px 0 30px;
      text-align: center;
      color:  #cf4444;;
    
    }
    .price {
      
      
    }
  }
}
</style>